<?php
	require_once '../libs/app.config.php';
	require_once INCLUDE_PATH.'template.config.php';
	require_once 'head.php';
	$charset?null:$charset='cn';
	$charset  = $tpm->escape($charset);
	/** latest **/
	$sql = sprintf('select a.id,a.title,a.content,ac.cat_name,ac.cat_name_en from articles a, article_cat ac where ac.cat_name="LATEST NEWS AND INFORMATION" ' .
			'and a.type="%s" and a.cat_id=ac.id order by add_time desc limit 5',$charset);
	$query = $tpm->query($sql);
	while($row = $tpm->fetch_array($query)) $latest[]=$row;
	$tpl->assign("latest",$latest);


	if($charset=='en'){
		$tpl->display("index_en.html");
	}else{
		$tpl->display("index_cn.html");
	}
?>